package com.rocbrid.validator;

import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;
import jakarta.validation.Valid;

public class StateValidator implements ConstraintValidator<Valid,String> {
    @Override
    public boolean isValid(String value, ConstraintValidatorContext context) {
        return "已发布".equals(value) || "草稿".equals(value);
    }
}
